/**
 * AddCargoTest.java
 * @author Jessica Roberts
 */
package m10;

import static org.junit.Assert.*;

import org.junit.Test;

import m07.Ship;
import m07.Good;

public class AddCargoTest
{
	//Create 10 new Good objects to test 
	Good gwater = new Good ("Water", 0, 0, 30, 3, 4, "LOTSOFWATER", "DESERT", 30, 50, 0);
	Good gfurs = new Good ("Furs", 0, 0, 250, 10, 10, "RICHFAUA", "LIFELESS", 230, 280, 0);
	Good gfood = new Good ("Food", 1, 0, 100, 5, 5, "RICHSOIL", "POORSOIL", 90, 160, 0);
	Good gore = new Good ("Ore", 2, 2, 350, 20, 10, "MINERALRICH", "MINERALPOOR", 350, 420, 0);
	Good ggames = new Good ("Games", 3, 1, 250, -10, 5, "ARTISTIC", null, 160, 270, 0);
	Good gfire = new Good ("Firearms", 3, 1, 1250, -75, 100, "WARLIKE", null, 600, 1100, 0);
	Good gmeds = new Good ("Medicine", 4, 1, 650, -20, 10, "LOTSOFHERBS", null, 400, 700, 0);
	Good gmachine = new Good ("Machines", 4, 3, 900, -30, 5, null, null, 600, 800, 0);
	Good gnarc = new Good ("Narcotics", 5, 0, 3500, -125, 150, "WEIRDMUSHROOMS", null, 2000, 3000, 0);
	Good grobot = new Good ("Robots", 6, 4, 5000, -150, 100, null, null, 3500, 5000, 0);
		
	//Create a Ship to add the Goods
	Ship ship = new Ship("Flea", 10);
	
	@Test
	/**
	 * Adds a "water" Good to the Ship and tests to see if the Ship contains "water"
	 * @result True
	 */
	public void addWater() {
		ship.addCargo(gwater);
		assertTrue(ship.contains("water"));
	}
	@Test
	/**
	 * Adds a "furs" Good to the Ship and tests to see if the Ship contains "furs"
	 * @result True
	 */
	public void addFurs() {
		ship.addCargo(gfurs);
		assertTrue(ship.contains("furs"));
	}
	
	@Test
	/**
	 * Adds a "food" Good to the Ship and tests to see if the Ship contains "food"
	 * @result True
	 */
	public void addFood() {
		ship.addCargo(gfood);
		assertTrue(ship.contains("food"));
	}
	
	@Test
	/**
	 * Adds an "ore" Good to the Ship and tests to see if the Ship contains "ore"
	 * @result True
	 */
	public void addOre() {
		ship.addCargo(gore);
		assertTrue(ship.contains("ore"));
	}
	
	@Test
	/**
	 * Adds a "games" Good to the Ship and tests to see if the Ship contains "games"
	 * @result True
	 */
	public void addGames() {
		ship.addCargo(ggames);
		assertTrue(ship.contains("games"));
	}
	
	@Test
	/**
	 * Adds a "firearms" Good to the Ship and tests to see if the Ship contains "firearms"
	 * @result True
	 */
	public void addFire() {
		ship.addCargo(gfire);
		assertTrue(ship.contains("firearms"));
	}
	
	@Test
	/**
	 * Adds a "medicine" Good to the Ship and tests to see if the Ship contains "medicine"
	 * @result True
	 */
	public void addMeds() {
		ship.addCargo(gmeds);
		assertTrue(ship.contains("medicine"));
	}
	
	@Test
	/**
	 * Adds no Good to the Ship and tests to see if the Ship contains "machines"
	 * @result False - there is no "machines" Good in the Ship
	 */
	public void testFalseMachines() {
		assertFalse(ship.contains("machines"));
	}
	
	@Test
	/**
	 * Adds no Good to the Ship and tests to see if the Ship contains "narcotics"
	 * @result False - there is no "narcotics" Good in the Ship
	 */
	public void testFalseNarcotics() {
		assertFalse(ship.contains("narcotics"));
	}
	
	@Test
	/**
	 * Adds no Good to the Ship and tests to see if the Ship contains "robots"
	 * @result False - there is no "robots" Good in the Ship
	 */
	public void testFalseRobots() {
		assertFalse(ship.contains("robots"));
	}
	
}